package ro.gateway.aida.struts.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * 
 * @author Mihai Postelnicu<p>
 *	Used by admin listers
 *  e-mail (mihai@ro-gateway.org)<br>
 * (c) 2003 by eRomania Gateway<p>
 */
public class ProjectSearchForm extends ActionForm {
    // --------------------------------------------------------- Instance Variables
	protected int sector;
	protected String title;
	protected String description;
	protected long fundingOrg;
	protected long contractingOrg;
	protected long donorOrg;
	protected long beneficiaryOrg;
	protected long involvedPerson;
	protected long infoSourceOrg;
	protected String keywords;
	
	protected String loc_countryiso3;
	protected int loc_regionId;
	protected int loc_countyId;
	protected int loc_townId;
	protected int loc_villageId;
	protected int loc_cregionId;
	
	protected long alerterId;
	protected int status;
	protected long formatId;

    // --------------------------------------------------------- Methods

    /**
     * Method reset
     * @param ActionMapping mapping
     * @param HttpServletRequest request
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
    	sector=-1;
    	title="";
    	description="";
    	fundingOrg=-1;
    	contractingOrg=-1;
    	infoSourceOrg=-1;
    	donorOrg=-1;
    	beneficiaryOrg=-1;
    	involvedPerson=-1;
    	keywords="";
    	status=-1;
    	alerterId=-1;
    	loc_countryiso3=null;
    	loc_regionId=-1;
    	loc_countyId=-1;
    	loc_townId=-1;
    	loc_villageId=-1;
    	loc_cregionId=-1;
    	formatId=-1;
    }
	
	/**
	 * @return
	 */
	public long getBeneficiaryOrg() {
		return beneficiaryOrg;
	}

	/**
	 * @return
	 */
	public long getContractingOrg() {
		return contractingOrg;
	}


	/**
	 * @return
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return
	 */
	public long getDonorOrg() {
		return donorOrg;
	}

	/**
	 * @return
	 */
	public long getFundingOrg() {
		return fundingOrg;
	}

	/**
	 * @return
	 */
	public long getInvolvedPerson() {
		return involvedPerson;
	}

	/**
	 * @return
	 */
	public String getKeywords() {
		return keywords;
	}

	/**
	 * @return
	 */
	public int getSector() {
		return sector;
	}

	/**
	 * @return
	 */
	public int getStatus() {
		return status;
	}

	/**
	 * @return
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param l
	 */
	public void setBeneficiaryOrg(long l) {
		beneficiaryOrg = l;
	}

	/**
	 * @param l
	 */
	public void setContractingOrg(long l) {
		contractingOrg = l;
	}


	/**
	 * @param string
	 */
	public void setDescription(String string) {
		description = string;
	}

	/**
	 * @param l
	 */
	public void setDonorOrg(long l) {
		donorOrg = l;
	}

	/**
	 * @param l
	 */
	public void setFundingOrg(long l) {
		fundingOrg = l;
	}

	/**
	 * @param l
	 */
	public void setInvolvedPerson(long l) {
		involvedPerson = l;
	}

	/**
	 * @param string
	 */
	public void setKeywords(String string) {
		keywords = string;
	}

	/**
	 * @param i
	 */
	public void setSector(int i) {
		sector = i;
	}

	/**
	 * @param i
	 */
	public void setStatus(int i) {
		status = i;
	}

	/**
	 * @param string
	 */
	public void setTitle(String string) {
		title = string;
	}


	/**
	 * @return
	 */
	public long getAlerterId() {
		return alerterId;
	}

	/**
	 * @param l
	 */
	public void setAlerterId(long l) {
		alerterId = l;
	}

	/**
	 * @return Returns the loc_countryiso3.
	 */
	public String getLoc_countryiso3() {
		return loc_countryiso3;
	}
	/**
	 * @param loc_countryiso3 The loc_countryiso3 to set.
	 */
	public void setLoc_countryiso3(String loc_countryiso3) {
		if("".equals(loc_countryiso3)) this.loc_countryiso3=null; else
		this.loc_countryiso3 = loc_countryiso3;
	}
	/**
	 * @return Returns the loc_countyId.
	 */
	public int getLoc_countyId() {
		return loc_countyId;
	}
	/**
	 * @param loc_countyId The loc_countyId to set.
	 */
	public void setLoc_countyId(int loc_countyId) {
		this.loc_countyId = loc_countyId;
	}
	/**
	 * @return Returns the loc_cregionId.
	 */
	public int getLoc_cregionId() {
		return loc_cregionId;
	}
	/**
	 * @param loc_cregionId The loc_cregionId to set.
	 */
	public void setLoc_cregionId(int loc_cregionId) {
		this.loc_cregionId = loc_cregionId;
	}
	/**
	 * @return Returns the loc_regionId.
	 */
	public int getLoc_regionId() {
		return loc_regionId;
	}
	/**
	 * @param loc_regionId The loc_regionId to set.
	 */
	public void setLoc_regionId(int loc_regionId) {
		this.loc_regionId = loc_regionId;
	}
	/**
	 * @return Returns the loc_townId.
	 */
	public int getLoc_townId() {
		return loc_townId;
	}
	/**
	 * @param loc_townId The loc_townId to set.
	 */
	public void setLoc_townId(int loc_townId) {
		this.loc_townId = loc_townId;
	}
	/**
	 * @return Returns the loc_villageId.
	 */
	public int getLoc_villageId() {
		return loc_villageId;
	}
	/**
	 * @param loc_villageId The loc_villageId to set.
	 */
	public void setLoc_villageId(int loc_villageId) {
		this.loc_villageId = loc_villageId;
	}
	/**
	 * @return Returns the formatId.
	 */
	public long getFormatId() {
		return formatId;
	}
	/**
	 * @param formatId The formatId to set.
	 */
	public void setFormatId(long formatId) {
		this.formatId = formatId;
	}
	/**
	 * @return Returns the infoSourceOrg.
	 */
	public long getInfoSourceOrg() {
		return infoSourceOrg;
	}
	/**
	 * @param infoSourceOrg The infoSourceOrg to set.
	 */
	public void setInfoSourceOrg(long infoSourceOrg) {
		this.infoSourceOrg = infoSourceOrg;
	}
}
